﻿//具体实现方法
var $LawRegulationsTable = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            ////法律法规更新删除
            case '/api/LawRegulationsUpdate/DeleteMuti': Mock.mock(host + url, type, function (options) {
                var delIDs = options.body;
                var temp = [];
                for (var i = 0; i < $LawRegulationsTable.Arrays.length; i++) {
                    temp.push($LawRegulationsTable.Arrays[i]);
                }

                for (var i = 0; i < temp.length; i++) {
                    if (delIDs.includes(temp[i].id)) {

                        $LawRegulationsTable.Arrays.splice(i, 1);
                    }
                }
                return { result: "Success", message: null, data: null };
            }); break;
            ///此处为加载界面和分页触发条件和处理方法
            //获取List数据
            case '/api/LawRegulationsUpdate/GetList': Mock.mock(host + url, type,
                function (options) {
                    if ($LawRegulationsTable.Arrays.length == 0) {
                        $LawRegulationsTable.InitArray();
                    }
                    var p = JSON.parse(options.body);
                    //查询条件 写自己的查询条件 
                    //变更日期
                    var ChangeTime = p.model.ChangeTime;
                    //法律法规序号
                    var id = p.model.id;
                    //在此处进行转换
                    //文件级别
                    var FileLeve = getDicValue("65", p.model.FileLeve);
                    //法律法规名称
                    var LawRegulationsName = ("66", p.model.LawRegulationsName);
                    //发布主体
                    var IssueSubject = ("67", p.model.IssueSubject);
                    //文号/标准号
                    var Symbol = ("68", p.model.Symbol);
                    var IssueDate = p.model.IssueDate;
                    var ImplementationDate = p.model.ImplementationDate;
                    var UploadDate = p.model.UploadDate;
                    var Remarks = p.model.Remarks;
                    var AuditStatus = p.model.AuditStatus;
                    //法律法规信息补录--新增
                    //适用条款
                    var ApplyClause = ("68", p.model.ApplyClause);
                    //对应工作描述情况
                    var DescribeForWork = ("68", p.model.DescribeForWork);
                    //归属部门
                    var BelongToClass = ("68", p.model.BelongToClass);
                    //具体实施和执行
                    var SpecificImplement = ("68", p.model.SpecificImplement);
                    //了解
                    var Understand = ("68", p.model.Understand);
                    //录入时间
                    var InputTime = ("68", p.model.InputTime);
                    //录入人
                    var InputPerson = ("68", p.model.InputPerson);
                    //分页条件[从第几条取几个数据]
                    var offset = p.offset;
                    var limit = p.limit;
                    //查询条件 按自己实际的去过滤
                    //indexOf如果要检索的字符串值没有出现，则该方法返回 - 1。
                    var limitArrays2 = [];
                    for (var i = 0; i < $LawRegulationsTable.Arrays.length; i++) {
                        var law = $LawRegulationsTable.Arrays[i];
                        if (ChangeTime && law.ChangeTime.indexOf(ChangeTime) == -1)
                            continue;
                        if (id && law.id.indexOf(id) == -1)
                            continue;
                        //文件级别
                        if (FileLeve && law.FileLeve.indexOf(FileLeve) == -1)
                            continue;
                        law.FileLeve = getDicValue("65", law.FileLeve) == '' ? law.FileLeve : getDicValue("65", law.FileLeve);
                        //法律法规名称
                        if (LawRegulationsName && law.LawRegulationsName.indexOf(LawRegulationsName) == -1)
                            continue;
                        law.LawRegulationsName = getDicValue("66", law.LawRegulationsName) == '' ? law.LawRegulationsName : getDicValue("66", law.LawRegulationsName);
                        //发布主题
                        if (IssueSubject && law.IssueSubject.indexOf(IssueSubject) == -1)
                            continue;
                        law.IssueSubject = getDicValue("67", law.IssueSubject) == '' ? law.IssueSubject : getDicValue("67", law.IssueSubject);
                        //文号
                        if (Symbol && law.Symbol.indexOf(Symbol) == -1)
                            continue;
                        law.Symbol = getDicValue("68", law.Symbol) == '' ? law.Symbol : getDicValue("68", law.Symbol);
                        if (IssueDate && law.IssueDate.indexOf(IssueDate) == -1)
                            continue;
                        if (ImplementationDate && law.ImplementationDate.indexOf(ImplementationDate) == -1)
                            continue;
                        if (UploadDate && law.UploadDate.indexOf(UploadDate) == -1)
                            continue;
                        if (Remarks && law.Remarks.indexOf(Remarks) == -1)
                            continue;
                        //审核项
                        if (AuditStatus && law.AuditStatus.indexOf(AuditStatus) == -1)
                            continue;
                        law.AuditStatus = getDicValue("82", law.AuditStatus) == '' ? law.AuditStatus : getDicValue("82", law.AuditStatus);
                        //法律法规信息补录--新增
                        //适用条款
                        if (ApplyClause && law.ApplyClause.indexOf(ApplyClause) == -1)
                            continue;
                        //对工作状况进行描述
                        if (DescribeForWork && law.DescribeForWork.indexOf(DescribeForWork) == -1)
                            continue;
                        law.DescribeForWork = getDicValue("84", law.DescribeForWork) == '' ? law.DescribeForWork : getDicValue("84", law.DescribeForWork);
                        //归口部门
                        if (BelongToClass && law.BelongToClass.indexOf(BelongToClass) == -1)
                            continue;
                        law.BelongToClass = getDicValue("85", law.BelongToClass) == '' ? law.BelongToClass : getDicValue("85", law.BelongToClass);
                        //具体实施和执行
                        if (SpecificImplement && law.SpecificImplement.indexOf(SpecificImplement) == -1)
                            continue;
                        law.SpecificImplement = getDicValue("86", law.SpecificImplement) == '' ? law.SpecificImplement : getDicValue("86", law.SpecificImplement);
                        //了解
                        if (Understand && law.Understand.indexOf(Understand) == -1)
                            continue;
                        law.Understand = getDicValue("87", law.Understand) == '' ? law.Understand : getDicValue("87", law.Understand);
                        //录入时间
                        if (InputTime && law.InputTime.indexOf(InputTime) == -1)
                            continue;
                        //录入人
                        if (InputPerson && law.InputPerson.indexOf(InputPerson) == -1)
                            continue;
                        //将law加到limitArrays2数组中并且改变其长度
                        limitArrays2.push(law);
                    }
                    var limitArrays = [];
                    //console.log(limitArrays2.length);
                    for (var i = 0; i < limitArrays2.length; i++) {
                        if (i < offset + limit && i >= offset) {
                            limitArrays.push(limitArrays2[i]);
                        }
                    }
                    return {
                        result: "Success", message: null,
                        data: { pageData: limitArrays, rowCount: limitArrays2.length },
                    };
                }); break;

            //获取List数据_合规性评价及符合性评审管理List数据20190603
            case '/api/ComplianceAssessmentManag/GetList': Mock.mock(host + url, type,
                function (options) {
                    if ($LawRegulationsTable.Arrays.length == 0) {
                        $LawRegulationsTable.InitArray();
                    }
                    var p = JSON.parse(options.body);
                    //查询条件 写自己的查询条件 
                    //变更日期
                    var ChangeTime = p.model.ChangeTime;
                    //法律法规序号
                    var id = p.model.id;
                    //在此处进行转换
                    //文件级别
                    var FileLeve = getDicValue("65", p.model.FileLeve);
                    //法律法规名称
                    var LawRegulationsName = ("66", p.model.LawRegulationsName);
                    //发布主体
                    var IssueSubject = ("67", p.model.IssueSubject);
                    //文号/标准号
                    var Symbol = ("68", p.model.Symbol);
                    var IssueDate = p.model.IssueDate;
                    var ImplementationDate = p.model.ImplementationDate;
                    //var UploadDate = p.model.UploadDate;
                    var Remarks = p.model.Remarks;
                    //var AuditStatus = p.model.AuditStatus;

                    ///序号
                    var CAM_Id = p.model.CAM_Id;
                    //符合情况_符合或不符合
                    var CAM_Compliance = ("105", p.model.CAM_Compliance);
                    //（不）符合情况说明
                    var CAM_ComplianceStatement = ("106", p.model.CAM_ComplianceStatement);
                    //评审人
                    var CAM_ReviewPerson = p.model.CAM_ReviewPerson;
                    //评审日期
                    var CAM_ReviewDate = p.model.CAM_ReviewDate;

                    //法律法规信息补录--新增
                    //适用条款
                    var ApplyClause = ("68", p.model.ApplyClause);
                    //对应工作描述情况
                    var DescribeForWork = ("68", p.model.DescribeForWork);
                    //归属部门
                    var BelongToClass = ("68", p.model.BelongToClass);
                    //具体实施和执行
                    var SpecificImplement = ("68", p.model.SpecificImplement);
                    //了解
                    var Understand = ("68", p.model.Understand);
                    //录入时间
                    var InputTime = ("68", p.model.InputTime);
                    //录入人
                    var InputPerson = ("68", p.model.InputPerson);
                    //分页条件[从第几条取几个数据]
                    var offset = p.offset;
                    var limit = p.limit;
                    //查询条件 按自己实际的去过滤
                    //indexOf如果要检索的字符串值没有出现，则该方法返回 - 1。
                    var limitArrays2 = [];
                    for (var i = 0; i < $LawRegulationsTable.Arrays.length; i++) {
                        var law = $LawRegulationsTable.Arrays[i];
                        if (ChangeTime && law.ChangeTime.indexOf(ChangeTime) == -1)
                            continue;
                        if (id && law.id.indexOf(id) == -1)
                            continue;
                        //文件级别
                        if (FileLeve && law.FileLeve.indexOf(FileLeve) == -1)
                            continue;
                        law.FileLeve = getDicValue("65", law.FileLeve) == '' ? law.FileLeve : getDicValue("65", law.FileLeve);
                        //法律法规名称
                        if (LawRegulationsName && law.LawRegulationsName.indexOf(LawRegulationsName) == -1)
                            continue;
                        law.LawRegulationsName = getDicValue("66", law.LawRegulationsName) == '' ? law.LawRegulationsName : getDicValue("66", law.LawRegulationsName);
                        //发布主题
                        if (IssueSubject && law.IssueSubject.indexOf(IssueSubject) == -1)
                            continue;
                        law.IssueSubject = getDicValue("67", law.IssueSubject) == '' ? law.IssueSubject : getDicValue("67", law.IssueSubject);
                        //文号
                        if (Symbol && law.Symbol.indexOf(Symbol) == -1)
                            continue;
                        law.Symbol = getDicValue("68", law.Symbol) == '' ? law.Symbol : getDicValue("68", law.Symbol);
                        if (IssueDate && law.IssueDate.indexOf(IssueDate) == -1)
                            continue;
                        if (ImplementationDate && law.ImplementationDate.indexOf(ImplementationDate) == -1)
                            continue;
                        //if (UploadDate && law.UploadDate.indexOf(UploadDate) == -1)
                        //    continue;
                        if (Remarks && law.Remarks.indexOf(Remarks) == -1)
                            continue;
                        //审核项
                        //if (AuditStatus && law.AuditStatus.indexOf(AuditStatus) == -1)
                        //    continue;
                        //law.AuditStatus = getDicValue("82", law.AuditStatus) == '' ? law.AuditStatus : getDicValue("82", law.AuditStatus);
                        //法律法规信息补录--新增
                        //适用条款
                        if (ApplyClause && law.ApplyClause.indexOf(ApplyClause) == -1)
                            continue;
                        //对工作状况进行描述
                        if (DescribeForWork && law.DescribeForWork.indexOf(DescribeForWork) == -1)
                            continue;
                        law.DescribeForWork = getDicValue("84", law.DescribeForWork) == '' ? law.DescribeForWork : getDicValue("84", law.DescribeForWork);
                        //归口部门
                        if (BelongToClass && law.BelongToClass.indexOf(BelongToClass) == -1)
                            continue;
                        law.BelongToClass = getDicValue("85", law.BelongToClass) == '' ? law.BelongToClass : getDicValue("85", law.BelongToClass);
                        //具体实施和执行
                        if (SpecificImplement && law.SpecificImplement.indexOf(SpecificImplement) == -1)
                            continue;
                        law.SpecificImplement = getDicValue("86", law.SpecificImplement) == '' ? law.SpecificImplement : getDicValue("86", law.SpecificImplement);
                        //了解
                        if (Understand && law.Understand.indexOf(Understand) == -1)
                            continue;
                        law.Understand = getDicValue("87", law.Understand) == '' ? law.Understand : getDicValue("87", law.Understand);
                        //录入时间
                        if (InputTime && law.InputTime.indexOf(InputTime) == -1)
                            continue;
                        //录入人
                        if (InputPerson && law.InputPerson.indexOf(InputPerson) == -1)
                            continue;

                        //序号
                        if (CAM_Id && law.CAM_Id.indexOf(CAM_Id) == -1)
                            continue;
                        //符合情况
                        if (CAM_Compliance && law.CAM_Compliance.indexOf(CAM_Compliance) == -1)
                            continue;
                        law.CAM_Compliance = getDicValue("105", law.CAM_Compliance) == '' ? law.CAM_Compliance : getDicValue("105", law.CAM_Compliance);
                        //（不）符合情况说明
                        if (CAM_ComplianceStatement && law.CAM_ComplianceStatement.indexOf(CAM_ComplianceStatement) == -1)
                            continue;
                        law.CAM_ComplianceStatement = getDicValue("106", law.CAM_ComplianceStatement) == '' ? law.CAM_ComplianceStatement : getDicValue("106", law.CAM_ComplianceStatement);
                        //评审人
                        if (CAM_ReviewPerson && law.CAM_ReviewPerson.indexOf(CAM_ReviewPerson) == -1)
                            continue;
                        //评审日期
                        if (CAM_ReviewDate && law.CAM_ReviewDate.indexOf(CAM_ReviewDate) == -1)
                            continue;

                        //将law加到limitArrays2数组中并且改变其长度
                        limitArrays2.push(law);
                    }
                    var limitArrays = [];
                    //console.log(limitArrays2.length);
                    for (var i = 0; i < limitArrays2.length; i++) {
                        if (i < offset + limit && i >= offset) {
                            limitArrays.push(limitArrays2[i]);
                        }
                    }
                    return {
                        result: "Success", message: null,
                        data: { pageData: limitArrays, rowCount: limitArrays2.length },
                    };
                }); break;

            //获取Input数据__取合规性评价及符合性评审管理数据20190604`
            case '/api/ComplianceAssessmentManag/get': Mock.mock(host + url + '?' + param, type, function (options) {
                var myArrays = parent.$LawRegulationsTable.Arrays;
                myarray = {};
                for (var i = 0; i < myArrays.length; i++) {
                    if (myArrays[i].id == vueApp.id) {
                        myarray = myArrays[i];
                        break;
                    }
                }

                //console.log("ooooogetbeginoooo");
                //console.log(myarray);
                //console.log("ooooogetendoooo");

                return {
                    result: "Success", message: null, data: myarray
                };
            }); break;
            //提交_提交合规性评价及符合性评审管理数据20190604
            case '/api/ComplianceAssessmentManag/Save': Mock.mock(host + url, type, function (options) {
                var thisentity = JSON.parse(options.body);
                var thisArrays = parent.$LawRegulationsTable.Arrays;
                var cz = true;
                for (var i = 0; i < thisArrays.length; i++) {
                    //按自己实际的去修改内容
                    if (thisArrays[i].id == thisentity.id) {
                        thisArrays[i].CAM_Id = thisentity.CAM_Id;
                        thisArrays[i].CAM_Compliance = thisentity.CAM_Compliance; //符合情况
                        thisArrays[i].CAM_ComplianceStatement = thisentity.CAM_ComplianceStatement; //（不）符合情况说明
                        thisArrays[i].CAM_ReviewPerson = "张欣欣"; // thisentity.CAM_ReviewPerson; //评审人
                        thisArrays[i].CAM_ReviewDate = "2019-06-01"; //thisentity.CAM_ReviewDate;//评审日期
                        thisArrays[i].CAM_Mark = thisentity.CAM_Mark;//备注
                        cz = false;
                        break;
                    }
                }
                if (cz) {
                    //Input 页面需要 去操作List页面的数组 parent
                    //按自己实际的去添加内容
                    parent.$LawRegulationsTable.Arrays.unshift({
                        id: thisentity.id,
                        CAM_Id: thisentity.CAM_Id,
                        CAM_Compliance: thisentity.CAM_Compliance,
                        CAM_ComplianceStatement: thisentity.CAM_ComplianceStatement,
                        CAM_ReviewPerson: thisentity.CAM_ReviewPerson,
                        CAM_ReviewDate: thisentity.CAM_ReviewDate,
                        CAM_Mark: thisentity.CAM_Mark
                    });

                }

                //console.log("ooooobeginoooo");
                //console.log(parent.$LawRegulationsTable.Arrays);
                //console.log("oooooendoooo");

                return { result: "Success", message: null, data: null };

                //console.log("endendendend");

            }); break;

            //获取List数据_管理制度类别取List数据20190601
            case '/api/ManageSystemCategory/GetList': Mock.mock(host + url, type,
                function (options) {
                    if ($LawRegulationsTable.Arrays.length == 0) {
                        $LawRegulationsTable.InitArray();
                    }
                    var p = JSON.parse(options.body);
                    //查询条件 写自己的查询条件 
                    //id
                    var id = p.model.id;
                    //类别序号
                    var CM_Id = p.model.CM_Id;
                    //在此处进行转换
                    ////文件级别
                    //var FileLeve = getDicValue("65", p.model.FileLeve);
                    //类别名称
                    var CM_ClassName = ("65", p.model.CM_ClassName);
                    var CM_Person = p.model.CM_Person;
                    var CM_Time = p.model.CM_Time;
                    var CM_Mark = p.model.CM_Mark;
                    //分页条件[从第几条取几个数据]
                    var offset = p.offset;
                    var limit = p.limit;
                    //测试：test
                    //console.log("xxxxcbeginxxxx");
                    //console.log(CM_Id);
                    //console.log("xxxxcendxxxx");
                    //查询条件 按自己实际的去过滤
                    //indexOf如果要检索的字符串值没有出现，则该方法返回 - 1。
                    var limitArrays2 = [];
                    for (var i = 0; i < $LawRegulationsTable.Arrays.length; i++) {
                        var law = $LawRegulationsTable.Arrays[i];

                        if (id && law.id.indexOf(id) == -1)
                            continue;
                        if (CM_Id && law.CM_Id.indexOf(CM_Id) == -1)
                            continue;
                        //类别名称
                        if (CM_ClassName && law.CM_ClassName.indexOf(CM_ClassName) == -1)
                            continue;
                        law.CM_ClassName = getDicValue("65", law.CM_ClassName) == '' ? law.CM_ClassName : getDicValue("6", law.CM_ClassName);
                        //编辑人
                        if (CM_Person && law.CM_Person.indexOf(CM_Person) == -1)
                            continue;
                        // law.CM_Person = getDicValue("67", law.CM_Person) == '' ? law.CM_Person : getDicValue("67", law.CM_Person);

                        if (CM_Time && law.CM_Time.indexOf(CM_Time) == -1)
                            continue;

                        if (CM_Mark && law.CM_Mark.indexOf(CM_Mark) == -1)
                            continue;

                        //将law加到limitArrays2数组中并且改变其长度
                        limitArrays2.push(law);
                    }
                    var limitArrays = [];

                    //console.log("ooooooooo");
                    //console.log(limitArrays2);
                    //console.log("ppppppppp");

                    for (var i = 0; i < limitArrays2.length; i++) {
                        if (i < offset + limit && i >= offset) {
                            limitArrays.push(limitArrays2[i]);
                        }
                    }



                    return {
                        result: "Success", message: null,
                        data: { pageData: limitArrays, rowCount: limitArrays2.length },
                    };
                }); break;

            //获取Input数据__取管理制度类别列表数据20190601`
            case '/api/ManageSystemCategory/get': Mock.mock(host + url + '?' + param, type, function (options) {
                // var myArrays = parent.$LawRegulationsTable.Arrays;
                var myArrays = $LawRegulationsTable.Arrays;//行内编辑去掉parent
                myarray = {};
                for (var i = 0; i < myArrays.length; i++) {
                    if (myArrays[i].id == vueApp.id) {
                        myarray = myArrays[i];
                        break;
                    }
                }

                //console.log("ooooogetbeginoooo");
                //console.log(myarray);
                //console.log("ooooogetendoooo");

                return {
                    result: "Success", message: null, data: myarray
                };
            }); break;

            //提交_提交管理制度类别表单数据20190601
            case '/api/ManageSystemCategory/Save': Mock.mock(host + url, type, function (options) {
                var thisentity = JSON.parse(options.body);
                // var thisArrays = parent.$LawRegulationsTable.Arrays;
                var thisArrays = $LawRegulationsTable.Arrays;//行内编辑去掉parent
                var cz = true;
                for (var i = 0; i < thisArrays.length; i++) {
                    //按自己实际的去修改内容
                    if (thisArrays[i].id == thisentity.id) {
                        thisArrays[i].CM_Id = thisentity.CM_Id;
                        thisArrays[i].CM_ClassName = thisentity.CM_ClassName;
                        thisArrays[i].CM_Person = thisentity.CM_Person;
                        thisArrays[i].CM_Time = thisentity.CM_Time;
                        thisArrays[i].CM_Mark = thisentity.CM_Mark;
                        cz = false;
                        break;
                    }
                }
                if (cz) {
                    //Input 页面需要 去操作List页面的数组 parent
                    //按自己实际的去添加内容
                    // parent.$LawRegulationsTable.Arrays.unshift({
                    $LawRegulationsTable.Arrays.unshift({//行内编辑去掉parent
                        id: thisentity.id,
                        CM_Id: thisentity.CM_Id,
                        CM_ClassName: thisentity.CM_ClassName,
                        CM_Person: thisentity.CM_Person,
                        CM_Time: thisentity.CM_Time,
                        CM_Mark: thisentity.CM_Mark
                    });

                }

                //console.log("ooooobeginoooo");
                //console.log(parent.$LawRegulationsTable.Arrays);
                //console.log("oooooendoooo");

                return { result: "Success", message: null, data: null };

                //console.log("endendendend");

            }); break;
            ////删除_删除管理制度类别列表数据20190601
            case '/api/ManageSystemCategory/DeleteMuti': Mock.mock(host + url, type, function (options) {
                var delIDs = options.body;
                var temp = [];
                for (var i = 0; i < $LawRegulationsTable.Arrays.length; i++) {
                    temp.push($LawRegulationsTable.Arrays[i]);
                }

                for (var i = 0; i < temp.length; i++) {
                    if (delIDs.includes(temp[i].id)) {

                        $LawRegulationsTable.Arrays.splice(temp[i], 1);
                    }
                }
                return { result: "Success", message: null, data: null };
            }); break;

            //获取List数据_取类别列表数据20190528
            case '/api/CategoryManagementList/GetList': Mock.mock(host + url, type,
                function (options) {
                    if ($LawRegulationsTable.Arrays.length == 0) {
                        $LawRegulationsTable.InitArray();
                    }
                    var p = JSON.parse(options.body);
                    //查询条件 写自己的查询条件 
                    //id
                    var id = p.model.id;
                    //类别序号
                    var CM_Id = p.model.CM_Id;
                    //在此处进行转换
                    ////文件级别
                    //var FileLeve = getDicValue("65", p.model.FileLeve);
                    //类别名称
                    var CM_ClassName = ("65", p.model.CM_ClassName);
                    var CM_Person = p.model.CM_Person;
                    var CM_Time = p.model.CM_Time;
                    var CM_Mark = p.model.CM_Mark;
                    //分页条件[从第几条取几个数据]
                    var offset = p.offset;
                    var limit = p.limit;
                    //测试：test
                    //console.log("xxxxcbeginxxxx");
                    //console.log(CM_Id);
                    //console.log("xxxxcendxxxx");
                    //查询条件 按自己实际的去过滤
                    //indexOf如果要检索的字符串值没有出现，则该方法返回 - 1。
                    var limitArrays2 = [];
                    for (var i = 0; i < $LawRegulationsTable.Arrays.length; i++) {
                        var law = $LawRegulationsTable.Arrays[i];

                        if (id && law.id.indexOf(id) == -1)
                            continue;
                        if (CM_Id && law.CM_Id.indexOf(CM_Id) == -1)
                            continue;
                        //类别名称
                        if (CM_ClassName && law.CM_ClassName.indexOf(CM_ClassName) == -1)
                            continue;
                        law.CM_ClassName = getDicValue("65", law.CM_ClassName) == '' ? law.CM_ClassName : getDicValue("6", law.CM_ClassName);
                        //编辑人
                        if (CM_Person && law.CM_Person.indexOf(CM_Person) == -1)
                            continue;
                        // law.CM_Person = getDicValue("67", law.CM_Person) == '' ? law.CM_Person : getDicValue("67", law.CM_Person);

                        if (CM_Time && law.CM_Time.indexOf(CM_Time) == -1)
                            continue;

                        if (CM_Mark && law.CM_Mark.indexOf(CM_Mark) == -1)
                            continue;

                        //将law加到limitArrays2数组中并且改变其长度
                        limitArrays2.push(law);
                    }
                    var limitArrays = [];

                    //console.log("ooooooooo");
                    //console.log(limitArrays2);
                    //console.log("ppppppppp");

                    for (var i = 0; i < limitArrays2.length; i++) {
                        if (i < offset + limit && i >= offset) {
                            limitArrays.push(limitArrays2[i]);
                        }
                    }



                    return {
                        result: "Success", message: null,
                        data: { pageData: limitArrays, rowCount: limitArrays2.length },
                    };
                }); break;

            //获取Input数据__取类别列表数据20190528
            case '/api/CategoryManagementList/get': Mock.mock(host + url + '?' + param, type, function (options) {
                // var myArrays = parent.$LawRegulationsTable.Arrays;
                var myArrays = $LawRegulationsTable.Arrays;//行内编辑去掉parent
                myarray = {};
                for (var i = 0; i < myArrays.length; i++) {
                    if (myArrays[i].id == vueApp.id) {
                        myarray = myArrays[i];
                        break;
                    }
                }

                //console.log("ooooogetbeginoooo");
                //console.log(myarray);
                //console.log("ooooogetendoooo");

                return {
                    result: "Success", message: null, data: myarray
                };
            }); break;

            //提交_提交类别表单数据20190529
            case '/api/CategoryManagementList/Save': Mock.mock(host + url, type, function (options) {
                var thisentity = JSON.parse(options.body);
                // var thisArrays = parent.$LawRegulationsTable.Arrays;
                var thisArrays = $LawRegulationsTable.Arrays;//行内编辑去掉parent
                var cz = true;
                for (var i = 0; i < thisArrays.length; i++) {
                    //按自己实际的去修改内容
                    if (thisArrays[i].id == thisentity.id) {
                        thisArrays[i].CM_Id = thisentity.CM_Id;
                        thisArrays[i].CM_ClassName = thisentity.CM_ClassName;
                        thisArrays[i].CM_Person = thisentity.CM_Person;
                        thisArrays[i].CM_Time = thisentity.CM_Time;
                        thisArrays[i].CM_Mark = thisentity.CM_Mark;
                        cz = false;
                        break;
                    }
                }
                if (cz) {
                    //Input 页面需要 去操作List页面的数组 parent
                    //按自己实际的去添加内容
                    // parent.$LawRegulationsTable.Arrays.unshift({
                    $LawRegulationsTable.Arrays.unshift({//行内编辑去掉parent
                        id: thisentity.id,
                        CM_Id: thisentity.CM_Id,
                        CM_ClassName: thisentity.CM_ClassName,
                        CM_Person: thisentity.CM_Person,
                        CM_Time: thisentity.CM_Time,
                        CM_Mark: thisentity.CM_Mark
                    });

                }

                //console.log("ooooobeginoooo");
                //console.log(parent.$LawRegulationsTable.Arrays);
                //console.log("oooooendoooo");

                return { result: "Success", message: null, data: null };

                //console.log("endendendend");

            }); break;
            ////删除_删除类别表单数据20190530
            case '/api/CategoryManagementList/DeleteMuti': Mock.mock(host + url, type, function (options) {
                var delIDs = options.body;
                var temp = [];
                for (var i = 0; i < $LawRegulationsTable.Arrays.length; i++) {
                    temp.push($LawRegulationsTable.Arrays[i]);
                }

                for (var i = 0; i < temp.length; i++) {
                    if (delIDs.includes(temp[i].id)) {

                        $LawRegulationsTable.Arrays.splice(i, 1);
                    }
                }
                return { result: "Success", message: null, data: null };
            }); break;

            //法律法规补录界面获取Input数据方法实现
            case '/api/LegalRegulatoryInformationSupplementinput/get': Mock.mock(host + url + '?' + param, type, function (options) {
                var myArrays = parent.$LawRegulationsTable.Arrays;
                myarray = {};
                for (var i = 0; i < myArrays.length; i++) {
                    if (myArrays[i].id == vueApp.id) {
                        myarray = myArrays[i];
                        break;
                    }
                }
                return {
                    result: "Success", message: null, data: myarray
                };
            }); break;
            //法律法规补录界面--提交方法实现
            case '/api/LegalRegulatoryInformationSupplementinput/Save': Mock.mock(host + url, type, function (options) {
                //方法进入
                var thisentity = JSON.parse(options.body);
                var thisArrays = parent.$LawRegulationsTable.Arrays;
                var cz = true;
                for (var i = 0; i < thisArrays.length; i++) {
                    //console.log(thisentity.BelongToClass);
                    //if (thisentity.BelongToClass == 100) {
                    //    thisArrays[i].BelongToClass = "总经理"
                    //    console.log(thisArrays[i].BelongToClass)
                    //    var cz = false;
                    //}
                    //if (thisentity.BelongToClass == 300) {
                    //    thisArrays[i].BelongToClass = "技术科"
                    //    var cz = false;
                    //}
                    //按自己实际的去修改内容
                    if (thisArrays[i].id == thisentity.id) {
                        thisArrays[i].ChangeTime = thisentity.ChangeTime;
                        thisArrays[i].FileLeve = thisentity.FileLeve;
                        thisArrays[i].LawRegulationsName = thisentity.LawRegulationsName;
                        thisArrays[i].IssueSubject = thisentity.IssueSubject;
                        thisArrays[i].Symbol = thisentity.Symbol;
                        thisArrays[i].IssueDate = thisentity.IssueDate;
                        thisArrays[i].ImplementationDate = thisentity.ImplementationDate;
                        thisArrays[i].UploadDate = thisentity.UploadDate;
                        thisArrays[i].Remarks = thisentity.Remarks;
                        thisArrays[i].AuditStatus = thisentity.AuditStatus;
                        //法律法规信息补录--新增
                        thisArrays[i].ApplyClause = thisentity.ApplyClause;
                        thisArrays[i].DescribeForWork = thisentity.DescribeForWork;
                        thisArrays[i].BelongToClass = thisentity.BelongToClass;
                        thisArrays[i].SpecificImplement = thisentity.SpecificImplement;
                        thisArrays[i].Understand = thisentity.Understand;
                        thisArrays[i].InputTime = thisentity.InputTime;
                        thisArrays[i].InputPerson = thisentity.InputPerson;
                        thisArrays[i].belongClass = thisentity.belongClass;
                        thisArrays[i].doClass = thisentity.doClass;
                        thisArrays[i].understandClass = thisentity.understandClass;
                        cz = false;
                        break;
                    }
                }
                if (cz) {
                    //Input 页面需要 去操作List页面的数组 parent
                    //按自己实际的去添加内容
                    parent.$LawRegulationsTable.Arrays.push({
                        ChangeTime: thisentity.ChangeTime,
                        OperationTime: thisentity.OperationTime,
                        id: thisentity.id,
                        FileLeve: thisentity.FileLeve,
                        LawRegulationsName: thisentity.LawRegulationsName,
                        IssueSubject: thisentity.IssueSubject,
                        Symbol: thisentity.Symbol,
                        IssueDate: thisentity.IssueDate,
                        ImplementationDate: thisentity.ImplementationDate,
                        UploadDate: thisentity.UploadDate,
                        Remarks: thisentity.Remarks,
                        AuditStatus: thisentity.AuditStatus,
                        //法律法规信息补录--新增
                        ApplyClause: thisentity.ApplyClause,
                        DescribeForWork: thisentity.DescribeForWork,
                        BelongToClass: thisentity.BelongToClass,
                        SpecificImplement: thisentity.SpecificImplement,
                        Understand: thisentity.Understand,
                        InputTime: thisentity.InputTime,
                        InputPerson: thisentity.InputPerson,
                        belongClass: thisentity.belongClass,
                        doClass: thisentity.doClass,
                        understandClass: thisentity.understandClass
                    });
                }
                return { result: "Success", message: null, data: null };
            }); break;
        }


    },
    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            var n = i;//控制统一序号用

            $LawRegulationsTable.Arrays.push(Mock.mock({
                ChangeTime: Mock.Random.date(),
                OperationTime: Mock.Random.date(),
                id: Mock.Random.increment(),
                //随机所对应的文件级别--[汉字]
                LawRegulationsChangeTime: Mock.Random.date(),
                FileLeve: randomValue('65'),
                LawRegulationsName: randomValue('66'),
                IssueSubject: randomValue('67'),
                Symbol: randomValue('68'),
                IssueDate: Mock.Random.date(),
                ImplementationDate: Mock.Random.date(),
                UploadDate: Mock.Random.date(),
                Remarks: Mock.Random.cname(),
                AuditStatus: randomValue('82'),
                //法律法规信息补录--新增
                ApplyClause: Mock.mock('@range(20)').join(','),
                DescribeForWork: randomValue('84'),
                BelongToClass: randomValue('85'),
                SpecificImplement: randomValue('86'),
                Understand: randomValue('87'),
                InputTime: Mock.Random.date(),
                InputPerson: Mock.Random.cname(),
                belongClass: '',
                doClass: '',
                understandClass: '',

                //法律法规--合规性评价及符合性评审管理
                CAM_Id: n + 1,
                //CAM_Compliance: randomValue('105'),
                //CAM_ComplianceStatement: randomValue('106'),
                //CAM_ReviewPerson: Mock.Random.cname(),
                //CAM_ReviewDate: Mock.Random.date(),
                CAM_Compliance: "",
                CAM_ComplianceStatement: "",
                CAM_ReviewPerson: "",
                CAM_ReviewDate: "",
                CAM_Mark: Mock.Random.cname(),///////////////////////////////////////////////////////////////////

                //法律法规--类别管理
                CM_Id: n + 1,
                //CM_Id: Mock.Random.increment(),
                CM_ClassName: randomValue('65'),
                CM_Person: Mock.Random.cname(),
                CM_Time: Mock.Random.date(),
                CM_Mark: Mock.Random.cname(),
                id: Mock.Random.id()

            }));
        }
    },
}
//根据code key 获取 value 之后改成 ajax请求
function getclassDicValue(code, key) {
    var value = "";
    DicCode.forEach(function (v, i) {
        if (v.code == code) {
            v.data.forEach(function (o, j) {
                if (o.key == key) {
                    value = o.value;
                    return;
                }
            });
        }
    });
    return value;
}
//归属部门弹窗
var $BelongToClassChooseTable = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            //加载界面获得List数据
            //从前台走GetList方法,方法中通过url跳转至此处
            case '/api/BelongToClassChoose/GetList': Mock.mock(host + url, type, function (options) {
                if ($BelongToClassChooseTable.Arrays.length == 0) {
                    //调用下方方法,实现GetList方法
                    $BelongToClassChooseTable.InitArray();
                }
                //*****查询条件******//
                //获取界面中JSON所传值
                var p = JSON.parse(options.body);
                //部门名称
                var ClassName = getDicValue("85", p.model.ClassName);
                //分页条件[从第几条取几个数据]
                var offset = p.offset;
                var limit = p.limit;
                var limitArrays2 = [];
                for (var i = 0; i < $BelongToClassChooseTable.Arrays.length; i++) {
                    var BlongClass = $BelongToClassChooseTable.Arrays[i];
                    console.log(ClassName);
                    if (ClassName && BlongClass.ClassName.indexOf(ClassName) == -1)
                        continue;
                    BlongClass.ClassName = getDicValue("65", BlongClass.ClassName) == '' ? BlongClass.ClassName : getDicValue("65", BlongClass.ClassName);
                    //将数据传到数组中
                    limitArrays2.push(BlongClass);
                }
                var limitArrays = [];
                //console.log(limitArrays2.length);
                for (var i = 0; i < limitArrays2.length; i++) {
                    if (i < offset + limit && i >= offset) {
                        limitArrays.push(limitArrays2[i]);
                    }
                }
                return {
                    result: "Success", message: null,
                    data: { pageData: limitArrays, rowCount: limitArrays2.length },
                };
            }); break;
        }
    },
    //定义数组Arrays
    Arrays: [],
    //定义所抽取的随机函数
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            var n = i;//控制统一序号用

            $BelongToClassChooseTable.Arrays.push(Mock.mock({
                ////随机时间
                //ChangeTime: Mock.Random.date(),
                ////随机从1-20
                //Lawid: Mock.Random.increment(),
                ////随机Code中定义好的数字
                //FileLeve: randomValue('65'),
                ////随机名字
                //Remarks: Mock.Random.cname(),
                ////随机从1-20
                //ApplyClause: Mock.mock('@range(20)'),
                BelongToClass: randomValue('85'),
            }));
        }
    }
}
//法律法规清单管理
var $LawRegulationListTable = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            //加载界面获得List数据
            //从前台走GetList方法,方法中通过url跳转至此处【查询/遍历方法】
            case '/api/LawRegulationListAdministration/GetList': Mock.mock(host + url, type, function (options) {
                if ($LawRegulationListTable.Arrays.length == 0) {
                    //调用下方方法,实现GetList方法
                    $LawRegulationListTable.InitArray();
                    for (var j = 0; j < $LawRegulationListTable.Arrays.length; j++) {
                        if ($LawRegulationListTable.Arrays[j].FitSituation == "符合" && $LawRegulationListTable.Arrays[j].FitSituationOrNotDescribe == "") {
                            $LawRegulationListTable.Arrays[j].FitSituationOrNotDescribe = randomValue('109')
                        }
                        else {
                            $LawRegulationListTable.Arrays[j].FitSituationOrNotDescribe = randomValue('110')
                        }
                    }
                }
                console.log($LawRegulationListTable.Arrays)
                //*****查询条件******//
                //获取界面中JSON所传值
                var p = JSON.parse(options.body);
                //序号
                var FileLeve = getDicValue("65", p.model.FileLeve);
                var Remarks =  p.model.Remarks;
                //分页条件[从第几条取几个数据]
                var offset = p.offset;
                var limit = p.limit;
                var limit = p.limit;
                var limitArrays2 = [];
                for (var i = 0; i < $LawRegulationListTable.Arrays.length; i++) {
                    var LRList = $LawRegulationListTable.Arrays[i];
                    if (FileLeve && LRList.FileLeve.indexOf(FileLeve) == -1)
                        continue;
                    if (Remarks && LRList.Remarks.indexOf(Remarks) == -1)
                        continue;
                    LRList.FileLeve = getDicValue("65", LRList.FileLeve) == '' ? LRList.FileLeve : getDicValue("65", LRList.FileLeve);
                    //将数据传到数组中
                    limitArrays2.push(LRList);
                }
                var limitArrays = [];
                //console.log(limitArrays2.length);
                for (var i = 0; i < limitArrays2.length; i++) {
                    if (i < offset + limit && i >= offset) {
                        limitArrays.push(limitArrays2[i]);
                    }
                }
                return {
                    result: "Success", message: null,
                    data: { pageData: limitArrays, rowCount: limitArrays2.length },
                };
            }); break;
            //删除方法
            case '/api/LawRegulationListAdministration/DeleteMuti': Mock.mock(host + url, type, function (options) {
                var delIDs = options.body;
                var temp = [];
                for (var i = 0; i < $LawRegulationListTable.Arrays.length; i++) {
                    temp.push($LawRegulationListTable.Arrays[i]);
                }

                for (var i = 0; i < temp.length; i++) {
                    if (delIDs.includes(temp[i].id)) {
                        console.log(temp[i].id);
                        $LawRegulationListTable.Arrays.splice(temp[i], 1);
                    }
                }

                return { result: "Success", message: null, data: null };
            }); break;
            //添加和修改方法
            case '/api/LawRegulationListAdministration/Save': Mock.mock(host + url, type, function (options) {
                var thisentity = JSON.parse(options.body);
                var thisArrays = parent.$LawRegulationListTable.Arrays;
                var cz = true;
                for (var i = 0; i < thisArrays.length; i++) {
                    //按自己实际的去修改内容
                    if (thisArrays[i].id == thisentity.id) {
                        thisArrays[i].FileLeve = thisentity.FileLeve;
                        thisArrays[i].LawRegulationsName = thisentity.LawRegulationsName;
                        thisArrays[i].IssueSubject = thisentity.IssueSubject;
                        thisArrays[i].ApplyClause = thisentity.ApplyClause;
                        thisArrays[i].Symbol = thisentity.Symbol;
                        thisArrays[i].IssueDate = thisentity.IssueDate;
                        thisArrays[i].ImplementationDate = thisentity.ImplementationDate;
                        thisArrays[i].DescribeForWork = thisentity.DescribeForWork;
                        //thisArrays[i].IssueDate = thisentity.IssueDate;//附件
                        thisArrays[i].Remarks = thisentity.Remarks;
                        thisArrays[i].BelongToClass = thisentity.BelongToClass;
                        thisArrays[i].SpecificImplement = thisentity.SpecificImplement;
                        thisArrays[i].Understand = thisentity.Understand;
                        cz = false;
                        break;
                    }
                }
                if (cz) {
                    //Input 页面需要 去操作List页面的数组 parent
                    //按自己实际的去添加内容s
                    var Lawid = thisArrays.length + 1;
                    parent.$LawRegulationListTable.Arrays.push({
                        id: Lawid,
                        FileLeve: thisentity.FileLeve,
                        LawRegulationsName: thisentity.LawRegulationsName,
                        IssueSubject: thisentity.IssueSubject,
                        ApplyClause: thisentity.ApplyClause,
                        Symbol: thisentity.Symbol,
                        IssueDate: thisentity.IssueDate,
                        ImplementationDate: thisentity.ImplementationDate,
                        DescribeForWork: thisentity.DescribeForWork,
                        Remarks: thisentity.Remarks,
                        BelongToClass: thisentity.BelongToClass,
                        SpecificImplement: thisentity.SpecificImplement,
                        Understand: thisentity.Understand
                    });

                }
                return { result: "Success", message: null, data: null };
            }); break;
            //修改方法
            case '/api/LawRegulationListAdministration/get': Mock.mock(host + url + '?' + param, type, function (options) {
                var myArrays = parent.$LawRegulationListTable.Arrays;
                myarray = {};
                for (var i = 0; i < myArrays.length; i++) {
                    if (myArrays[i].id == vueApp.id) {
                        myarray = myArrays[i];
                        break;
                    }
                }
                return {
                    result: "Success", message: null, data: myarray
                };
            }); break;
        }
    },
    //定义数组Arrays
    Arrays: [],
    //定义所抽取的随机函数
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            var n = i;//控制统一序号用
            $LawRegulationListTable.Arrays.push(Mock.mock({
                //********************************************
                ////随机时间
                //ChangeTime: Mock.Random.date(),
                ////随机从1-20
                //Lawid: Mock.Random.increment(),
                ////随机Code中定义好的数字
                //FileLeve: randomValue('65'),
                ////随机名字
                //Remarks: Mock.Random.cname(),
                ////随机从1-20
                //ApplyClause: Mock.mock('@range(20)'),
                //********************************************
                //序号
                id: Mock.Random.increment(),
                //文件级别
                FileLeve: randomValue('65'),
                //法律法规名称
                LawRegulationsName: randomValue('66'),
                //发布主体
                IssueSubject: randomValue('67'),
                //文号/标准号
                Symbol: randomValue('68'),
                //颁布日期
                IssueDate: Mock.Random.date(),
                //实施日期
                ImplementationDate: Mock.Random.date(),
                //部门
                Class: randomValue('111'),
                //掌握程度
                MasterLeve: randomValue('112'),
                //符合情况--符合/不符合
                FitSituation: randomValue('108'),
                //(不)/符合情况描述
                FitSituationOrNotDescribe: '',

                ApplyClause: Mock.mock('@range(20)').join(','),//适用条款
                BelongToClass: randomValue('85'),//归口专业管理
                SpecificImplement: randomValue('86'),//具体实施和执行者
                Understand: randomValue('87'),//了解
                Attachment: randomValue('65'),//附件
                Responsibilities: randomValue('112'),//部门职责
                //备注
                Remarks: Mock.Random.cname()
            }));
        }
    },
    RandomName: function (FitSituationName) {
        if (FitSituationName == "符合") {
            $LawRegulationListTable.Arrays.push(Mock.mock({

            }));
        }
        else {
            $LawRegulationListTable.Arrays.push(Mock.mock({

            }));
        }
    }
};
//法律法规标准
var $LawRegulationStandardSpecification = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            //获取列表和查询条件
            case '/api/LawRegulationStandardSpecification/GetList': Mock.mock(host + url, type, function (options) {
                if ($LawRegulationStandardSpecification.Arrays.length == 0) {
                    $LawRegulationStandardSpecification.InitArray();
                }
                //查询条件
                var p = JSON.parse(options.body);
                //序号
                var FileLeve = getDicValue("65", p.model.FileLeve);
                var LawRegulationsName = ("66", p.model.LawRegulationsName);
                var Remarks =  p.model.Remarks;
                console.log(FileLeve);
                //分页条件[从第几条取几个数据]
                var offset = p.offset;
                var limit = p.limit;
                var limitArrays2 = [];
                for (var i = 0; i < $LawRegulationStandardSpecification.Arrays.length; i++) {
                    var LRList = $LawRegulationStandardSpecification.Arrays[i];
                    if (FileLeve && LRList.FileLeve.indexOf(FileLeve) == -1)
                        continue;
                    LRList.FileLeve = getDicValue("65", LRList.FileLeve) == '' ? LRList.FileLeve : getDicValue("65", LRList.FileLeve);
                    //法律法规名称
                    if (LawRegulationsName && LRList.LawRegulationsName.indexOf(LawRegulationsName) == -1)
                        continue;
                    if (Remarks && LRList.Remarks.indexOf(Remarks) == -1)
                        continue;
                    LRList.LawRegulationsName = getDicValue("66", LRList.LawRegulationsName) == '' ? LRList.LawRegulationsName : getDicValue("66", LRList.LawRegulationsName);
                    //将数据传到数组中
                    limitArrays2.push(LRList);
                }
                var limitArrays = [];
                //console.log(limitArrays2.length);
                for (var i = 0; i < limitArrays2.length; i++) {
                    if (i < offset + limit && i >= offset) {
                        limitArrays.push(limitArrays2[i]);
                    }
                }
                return {
                    result: "Success", message: null,
                    data: { pageData: limitArrays, rowCount: limitArrays2.length },
                };
            }); break;
        }
    },
    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            var n = i;//控制统一序号用

            $LawRegulationStandardSpecification.Arrays.push(Mock.mock({
                ChangeTime: Mock.Random.date(),
                id: Mock.Random.increment(),
                //随机所对应的文件级别--[汉字]
                LawRegulationsChangeTime: Mock.Random.date(),
                FileLeve: randomValue('65'),
                LawRegulationsName: randomValue('66'),
                IssueSubject: randomValue('67'),
                Symbol: randomValue('68'),
                IssueDate: Mock.Random.date(),
                ImplementationDate: Mock.Random.date(),
                UploadDate: Mock.Random.date(),
                Remarks: Mock.Random.cname(),
                AuditStatus: randomValue('82'),
                StandardSpecification: randomValue('98'),
            }));
        }
    }
};
//法律法规合规性评价报告管理
var $LawRegulationsFitAdministration = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            //遍历表格数据|查询数据
            case '/api/LawRegulationsFitAdministration/GetList': Mock.mock(host + url, type, function (options) {
                if ($LawRegulationsFitAdministration.Arrays.length == 0) {
                    //调用下方方法,实现GetList方法
                    $LawRegulationsFitAdministration.InitArray();
                }
                //*****查询条件******//
                //获取界面中JSON所传值
                var p = JSON.parse(options.body);
                //序号
                var years = p.model.years;
                var Remarks = p.model.Remarks;
                //分页条件[从第几条取几个数据]
                var offset = p.offset;
                var limit = p.limit;
                var limitArrays2 = [];
                for (var i = 0; i < $LawRegulationsFitAdministration.Arrays.length; i++) {
                    var LRList = $LawRegulationsFitAdministration.Arrays[i];
                    if (years && LRList.years.indexOf(years) == -1)
                        continue;
                    if (Remarks && LRList.Remarks.indexOf(Remarks) == -1)
                        continue;
                    //将数据传到数组中
                    limitArrays2.push(LRList);
                }
                var limitArrays = [];
                //console.log(limitArrays2.length);
                for (var i = 0; i < limitArrays2.length; i++) {
                    if (i < offset + limit && i >= offset) {
                        limitArrays.push(limitArrays2[i]);
                    }
                }
                return {
                    result: "Success", message: null,
                    data: { pageData: limitArrays, rowCount: limitArrays2.length },
                };
            }); break;
            //删除方法
            case '/api/LawRegulationsFitAdministration/DeleteMuti': Mock.mock(host + url, type, function (options) {
                var delIDs = options.body;
                var temp = [];
                for (var i = 0; i < $LawRegulationsFitAdministration.Arrays.length; i++) {
                    temp.push($LawRegulationsFitAdministration.Arrays[i]);
                }

                for (var i = 0; i < temp.length; i++) {
                    if (delIDs.includes(temp[i].id)) {
                        console.log(temp[i].id);
                        $LawRegulationsFitAdministration.Arrays.splice(temp[i], 1);
                    }
                }

                return { result: "Success", message: null, data: null };
            }); break;
            //获取Input数据
            case '/api/LawRegulationsFitAdministration/get': Mock.mock(host + url + '?' + param, type, function (options) {
                var myArrays = parent.$LawRegulationsFitAdministration.Arrays;
                myarray = {};
                for (var i = 0; i < myArrays.length; i++) {
                    if (myArrays[i].id == vueApp.id) {
                        myarray = myArrays[i];
                        break;
                    }
                }
                return {
                    result: "Success", message: null, data: myarray
                };
            }); break;
            //获取职能部门Input
            case '/api/LawRegulationsFitAdministration/InputList': Mock.mock(host + url, type, function (options) {
                if ($LawRegulationsFitAdministration.Arrays.length == 0) {
                    //调用下方方法,实现GetList方法
                    $LawRegulationsFitAdministration.InitArray();
                }
                var limitArrays2 = [];
                for (var i = 0; i < $LawRegulationsFitAdministration.Arrays.length; i++) {
                    var LRList = $LawRegulationsFitAdministration.Arrays[i];
                    //将数据传到数组中
                    limitArrays2.push(LRList);
                }
                return {
                    result: "Success", message: null,
                    data: { pageData: limitArrays2, rowCount: limitArrays2.length },
                };
            }); break;
            //获取Law_Input数据
            case '/api/LawRegulationsFitAdministration/LawInputList': Mock.mock(host + url, type, function (options) {
                if ($LawRegulationsFitAdministration.Arrays2.length == 0) {
                    //调用下方方法,实现GetList方法
                    $LawRegulationsFitAdministration.InitArray3();
                }
                var limitArrays3 = [];
                for (var i = 0; i < $LawRegulationsFitAdministration.Arrays2.length; i++) {
                    var LRList = $LawRegulationsFitAdministration.Arrays2[i];
                    //将数据传到数组中
                    limitArrays3.push(LRList);
                }
                return {
                    result: "Success", message: null,
                    data: { pageData: limitArrays3, rowCount: limitArrays3.length },
                };
            }); break;
            //获取不符合Input数据
            case '/api/LawRegulationsFitAdministration/NotInputList': Mock.mock(host + url, type, function (options) {
                if ($LawRegulationsFitAdministration.Arrays3.length == 0) {
                    //调用下方方法,实现GetList方法
                    $LawRegulationsFitAdministration.InitArray4();
                }
                var limitArrays4 = [];
                for (var i = 0; i < $LawRegulationsFitAdministration.Arrays3.length; i++) {
                    var LRList = $LawRegulationsFitAdministration.Arrays3[i];
                    //将数据传到数组中
                    limitArrays4.push(LRList);
                }
                return {
                    result: "Success", message: null,
                    data: { pageData: limitArrays4, rowCount: limitArrays4.length },
                };
            }); break;
            //添加和修改方法
            case '/api/LawRegulationsFitAdministration/Save': Mock.mock(host + url, type, function (options) {
                var thisentity = JSON.parse(options.body);
                var thisArrays = parent.$LawRegulationsFitAdministration.Arrays;
                console.log(thisArrays.id);
                var cz = true;
                for (var i = 0; i < thisArrays.length; i++) {
                    //按自己实际的去修改内容
                    if (thisArrays[i].id == thisentity.id) {
                        thisArrays[i].years = thisentity.years;
                        thisArrays[i].evaluateAim = thisentity.evaluateAim;
                        thisArrays[i].evaluateRange = thisentity.evaluateRange;
                        thisArrays[i].evaluateItem = thisentity.evaluateItem;
                        thisArrays[i].evaluateOverviewInput1 = thisentity.evaluateOverviewInput1;
                        thisArrays[i].evaluateOverviewInput2 = thisentity.evaluateOverviewInput2;
                        thisArrays[i].notFitAnalysis = thisentity.notFitAnalysis;
                        thisArrays[i].evaluateResult = thisentity.evaluateResult;
                        thisArrays[i].Remarks = thisentity.Remarks;
                        thisArrays[i].auditor = thisentity.auditor;
                        thisArrays[i].auditDate = thisentity.auditDate;
                        thisArrays[i].approver = thisentity.approver;
                        thisArrays[i].approveDate = thisentity.approveDate;
                        //表格1
                        thisArrays[i].tablebox1.class = thisentity.class;
                        thisArrays[i].tablebox1.countryLaw = thisentity.countryLaw;
                        thisArrays[i].tablebox1.countryRegulations = thisentity.countryRegulations;
                        thisArrays[i].tablebox1.countryClassRules = thisentity.countryClassRules;
                        thisArrays[i].tablebox1.countryClassStandard = thisentity.countryClassStandard;
                        thisArrays[i].tablebox1.localRegulationsRequire = thisentity.localRegulationsRequire;
                        thisArrays[i].tablebox1.standardAndStandard = thisentity.standardAndStandard;
                        thisArrays[i].tablebox1.higherCompanyAsk = thisentity.higherCompanyAsk;
                        thisArrays[i].tablebox1.total = thisentity.total;
                        //表格2
                        thisArrays[i].tablebox1.Lawclass = thisentity.Lawclass;
                        thisArrays[i].tablebox1.LawcountryLaw = thisentity.LawcountryLaw;
                        thisArrays[i].tablebox1.LawcountryRegulations = thisentity.LawcountryRegulations;
                        thisArrays[i].tablebox1.LawcountryClassRules = thisentity.LawcountryClassRules;
                        thisArrays[i].tablebox1.LawcountryClassStandard = thisentity.LawcountryClassStandard;
                        thisArrays[i].tablebox1.LawlocalRegulationsRequire = thisentity.LawlocalRegulationsRequire;
                        thisArrays[i].tablebox1.LawstandardAndStandard = thisentity.LawstandardAndStandard;
                        thisArrays[i].tablebox1.LawhigherCompanyAsk = thisentity.LawhigherCompanyAsk;
                        thisArrays[i].tablebox1.Lawtotal = thisentity.Lawtotal;
                        //表格3
                        thisArrays[i].tablebox1.Notclass = thisentity.Notclass;
                        thisArrays[i].tablebox1.NotcountryLaw = thisentity.NotcountryLaw;
                        thisArrays[i].tablebox1.NotcountryRegulations = thisentity.NotcountryRegulations;
                        thisArrays[i].tablebox1.NotcountryClassRules = thisentity.NotcountryClassRules;
                        thisArrays[i].tablebox1.NotcountryClassStandard = thisentity.NotcountryClassStandard;
                        thisArrays[i].tablebox1.NotlocalRegulationsRequire = thisentity.NotlocalRegulationsRequire;
                        thisArrays[i].tablebox1.NotstandardAndStandard = thisentity.NotstandardAndStandard;
                        thisArrays[i].tablebox1.NothigherCompanyAsk = thisentity.NothigherCompanyAsk;
                        thisArrays[i].tablebox1.Nottotal = thisentity.Nottotal;
                        cz = false;
                        break;
                    }
                }
                if (cz) {
                    //Input 页面需要 去操作List页面的数组 parent
                    //按自己实际的去添加内容s
                    var id = thisArrays.length + 1;
                    parent.$LawRegulationsFitAdministration.Arrays.push({
                        id: id,
                        years: thisentity.years,
                        evaluateAim: thisentity.evaluateAim,
                        evaluateRange: thisentity.evaluateRange,
                        evaluateItem: thisentity.evaluateItem,
                        evaluateOverviewInput1: thisentity.evaluateOverviewInput1,
                        evaluateOverviewInput2: thisentity.evaluateOverviewInput2,
                        notFitAnalysis: thisentity.notFitAnalysis,
                        evaluateResult: thisentity.evaluateResult,
                        Remarks: thisentity.Remarks,
                        auditor: thisentity.auditor,
                        auditDate: thisentity.auditDate,
                        approver: thisentity.approver,
                        approveDate: thisentity.approveDate,
                        //表格1
                        class : thisentity.class,
                        countryLaw : thisentity.countryLaw,
                        countryRegulations : thisentity.countryRegulations,
                        countryClassRules : thisentity.countryClassRules,
                        countryClassStandard : thisentity.countryClassStandard,
                        localRegulationsRequire : thisentity.localRegulationsRequire,
                        standardAndStandard : thisentity.standardAndStandard,
                        higherCompanyAsk : thisentity.higherCompanyAsk,
                        total : thisentity.total,
                        //表格2
                        Lawclass : thisentity.Lawclass,
                        LawcountryLaw : thisentity.LawcountryLaw,
                        LawcountryRegulations : thisentity.LawcountryRegulations,
                        LawcountryClassRules : thisentity.LawcountryClassRules,
                        LawcountryClassStandard : thisentity.LawcountryClassStandard,
                        LawlocalRegulationsRequire : thisentity.LawlocalRegulationsRequire,
                        LawstandardAndStandard : thisentity.LawstandardAndStandard,
                        LawhigherCompanyAsk : thisentity.LawhigherCompanyAsk,
                        Lawtotal : thisentity.Lawtotal,
                        //表格3
                        Notclass : thisentity.Notclass,
                        NotcountryLaw : thisentity.NotcountryLaw,
                        NotcountryRegulations : thisentity.NotcountryRegulations,
                        NotcountryClassRules : thisentity.NotcountryClassRules,
                        NotcountryClassStandard : thisentity.NotcountryClassStandard,
                        NotlocalRegulationsRequire : thisentity.NotlocalRegulationsRequire,
                        NotstandardAndStandard : thisentity.NotstandardAndStandard,
                        NothigherCompanyAsk : thisentity.NothigherCompanyAsk,
                        Nottotal : thisentity.Nottotal
                    });

                }
                return { result: "Success", message: null, data: null };
            }); break;
            //审核方法
            case '/api/LawRegulationsFitAdministration/Examine': Mock.mock(host + url, type, function (options) {
                var thisentity = JSON.parse(options.body);
                var thisArrays = parent.$LawRegulationsFitAdministration.Arrays;
                var cz = true;
                for (var i = 0; i < thisArrays.length; i++) {
                    //按自己实际的去修改内容
                    if (thisArrays[i].id == thisentity.id) {
                        thisArrays[i].years = thisentity.years;
                        thisArrays[i].evaluateAim = thisentity.evaluateAim;
                        thisArrays[i].evaluateRange = thisentity.evaluateRange;
                        thisArrays[i].evaluateItem = thisentity.evaluateItem;
                        thisArrays[i].evaluateOverviewInput1 = thisentity.evaluateOverviewInput1;
                        thisArrays[i].evaluateOverviewInput2 = thisentity.evaluateOverviewInput2;
                        thisArrays[i].notFitAnalysis = thisentity.notFitAnalysis;
                        thisArrays[i].evaluateResult = thisentity.evaluateResult;
                        thisArrays[i].Remarks = thisentity.Remarks;
                        thisArrays[i].auditor = "张三";
                        thisArrays[i].auditDate = thisentity.auditDate;
                        thisArrays[i].approver = thisentity.approver;
                        thisArrays[i].approveDate = thisentity.approveDate;
                        cz = false;
                        break;
                    }
                }
                if (cz) {
                    //Input 页面需要 去操作List页面的数组 parent
                    //按自己实际的去添加内容s
                    var id = thisArrays.length + 1;
                    parent.$LawRegulationsFitAdministration.Arrays.push({
                        id: id,
                        years: thisentity.years,
                        evaluateAim: thisentity.evaluateAim,
                        evaluateRange: thisentity.evaluateRange,
                        evaluateItem: thisentity.evaluateItem,
                        evaluateOverviewInput1: thisentity.evaluateOverviewInput1,
                        evaluateOverviewInput2: thisentity.evaluateOverviewInput2,
                        notFitAnalysis: thisentity.notFitAnalysis,
                        evaluateResult: thisentity.evaluateResult,
                        Remarks: thisentity.Remarks,
                        auditor: "张三",
                        auditDate: thisentity.auditDate,
                        approver: thisentity.approver,
                        approveDate: thisentity.approveDate,
                    });

                }
                return { result: "Success", message: null, data: null };
            }); break;
            //批准方法
            case '/api/LawRegulationsFitAdministration/Approval': Mock.mock(host + url, type, function (options) {
                var thisentity = JSON.parse(options.body);
                var thisArrays = parent.$LawRegulationsFitAdministration.Arrays;
                var cz = true;
                for (var i = 0; i < thisArrays.length; i++) {
                    //按自己实际的去修改内容
                    if (thisArrays[i].id == thisentity.id) {
                        thisArrays[i].years = thisentity.years;
                        thisArrays[i].evaluateAim = thisentity.evaluateAim;
                        thisArrays[i].evaluateRange = thisentity.evaluateRange;
                        thisArrays[i].evaluateItem = thisentity.evaluateItem;
                        thisArrays[i].evaluateOverviewInput1 = thisentity.evaluateOverviewInput1;
                        thisArrays[i].evaluateOverviewInput2 = thisentity.evaluateOverviewInput2;
                        thisArrays[i].notFitAnalysis = thisentity.notFitAnalysis;
                        thisArrays[i].evaluateResult = thisentity.evaluateResult;
                        thisArrays[i].Remarks = thisentity.Remarks;
                        thisArrays[i].auditor = thisentity.auditor;
                        thisArrays[i].auditDate = thisentity.auditDate;
                        thisArrays[i].approver = "李四";
                        thisArrays[i].approveDate = thisentity.approveDate;
                        cz = false;
                        break;
                    }
                }
                if (cz) {
                    //Input 页面需要 去操作List页面的数组 parent
                    //按自己实际的去添加内容s
                    var id = thisArrays.length + 1;
                    parent.$LawRegulationsFitAdministration.Arrays.push({
                        id: id,
                        years: thisentity.years,
                        evaluateAim: thisentity.evaluateAim,
                        evaluateRange: thisentity.evaluateRange,
                        evaluateItem: thisentity.evaluateItem,
                        evaluateOverviewInput1: thisentity.evaluateOverviewInput1,
                        evaluateOverviewInput2: thisentity.evaluateOverviewInput2,
                        notFitAnalysis: thisentity.notFitAnalysis,
                        evaluateResult: thisentity.evaluateResult,
                        Remarks: thisentity.Remarks,
                        auditor: thisentity.auditor,
                        auditDate: thisentity.auditDate,
                        approver: "李四",
                        approveDate: thisentity.approveDate,
                    });

                }
                return { result: "Success", message: null, data: null };
            }); break;

        }
    },
    Arrays: [],
    Arrays2: [],
    Arrays3: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            var n = i;//控制统一序号用
            $LawRegulationsFitAdministration.Arrays.push(Mock.mock({
                //序号
                id: Mock.Random.increment(),
                //年份
                years: Mock.Random.date('yyyy'),
                //编制部门
                organizationClass: '质量部门',
                //评审目的
                evaluateAim: randomValue('108'),
                //日期
                date: Mock.mock('@date'),
                //审核人
                auditor: '',
                //审核日期
                auditDate: Mock.mock('@date'),
                //审核日期2
                tableAuditDate: Mock.mock('@date'),
                //批准人
                approver: '',
                //批准日期
                approveDate: Mock.mock('@date'),
                Remarks: Mock.Random.cname(),
                /*************表格中数据*****************/
                //评价范围
                evaluateRange: '全体',
                //评价小组及成员
                evaluateItem: '全体',
                //评级综述1-2input
                evaluateOverviewInput1: '通过',
                evaluateOverviewInput2: '通过',
                //不符合分析和整改
                notFitAnalysis: '核实中',
                //评价结论
                evaluateResult: '通过',
                //ThreeTable
                tablebox1: [
                    //部门
                    {
                        "class|0-5": 5,
                        //国家法律
                        "countryLaw|0-5": 5,
                        //国家法规
                        "countryRegulations|0-5": 5,
                        //国家部门规章
                        "countryClassRules|0-5": 5,
                        //国家部门规范
                        "countryClassStandard|0-5": 5,
                        //地方性法规及要求
                        "localRegulationsRequire|0-5": 5,
                        //标准和规范
                        "standardAndStandard|0-5": 5,
                        //上级公司制度及要求
                        "higherCompanyAsk|0-5": 5,
                        //合计
                        "total": ''},
                ],
                tablebox2: [
                    /*****************************/
                    //获取法律法规表格随机数据
                    //部门
                    { "Lawclass|0-5": 5 ,
                    //国家法律
                     "LawcountryLaw|0-5": 5 ,
                    //国家法规
                     "LawcountryRegulations|0-5": 5 ,
                    //国家部门规章
                     "LawcountryClassRules|0-5": 5 ,
                    //国家部门规范
                     "LawcountryClassStandard|0-5": 5 ,
                    //地方性法规及要求
                     "LawlocalRegulationsRequire|0-5": 5 ,
                    //标准和规范
                     "LawstandardAndStandard|0-5": 5 ,
                    //上级公司制度及要求
                     "LawhigherCompanyAsk|0-5": 5 ,
                     Lawtotal: '' },
                ],
                tablebox3: [
                    /****************************/
                    //部门
                    { "Notclass|0-5": 5 ,
                    //国家法律
                     "NotcountryLaw|0-5": 5 ,
                    //国家法规
                     "NotcountryRegulations|0-5": 5 ,
                    //国家部门规章
                     "NotcountryClassRules|0-5": 5 ,
                    //国家部门规范
                     "NotcountryClassStandard|0-5": 5 ,
                    //地方性法规及要求
                     "NotlocalRegulationsRequire|0-5": 5 ,
                    //标准和规范
                     "NotstandardAndStandard|0-5": 5 ,
                    //上级公司制度及要求
                     "NothigherCompanyAsk|0-5": 5 ,
                     Nottotal: '' },
                ],
            }));
        }
    },
};


// 法律法规_信息提醒
var $InfoRemind = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            //获取列表和查询条件_管理制度
            case '/api/InfoRemind/GetList': Mock.mock(host + url, type, function (options) {
                if ($InfoRemind.Arrays.length == 0) {
                    $InfoRemind.InitArray();
                }
                var p = JSON.parse(options.body);
                //查询条件 写自己的查询条件 

                //id
                var id = p.model.id;
                //序号
                var MS_Id = p.model.MS_Id;
                //制度名称
                var MS_InstitutionName = ("66", p.model.MS_InstitutionName);
                // //文件编号
                // var MS_FileNo = ("68", p.model.MS_FileNo);
                // //类别
                var MS_Sort = ("65", p.model.MS_Sort);
                // //实施日期
                // var MS_ImplementationDate = p.model.MS_ImplementationDate;
                // //评审日期
                // var MS_ReviewDate = p.model.MS_ReviewDate;
                //相关部门
                var MS_RelevantDepartments = ("67", p.model.MS_RelevantDepartments);

                //相关部门new
                var MS_Departments = p.model.MS_Departments;
                var MS_Mark = p.model.MS_Mark;


                // //状态
                // var MS_State = p.model.MS_State;
                // //审核日期
                // var MS_CheckDate = p.model.MS_CheckDate;
                // //修订日期
                // var MS_RevisionDate = p.model.MS_RevisionDate;
                ////备注
                // var MS_Mark = p.model.MS_Mark;
                // //var AuditStatus = p.model.AuditStatus;
                //审核人
                var MS_CheckPerson = ("09", p.model.MS_CheckPerson);
                //审核日期开始
                var MS_CheckDateBegin = p.model.MS_CheckDateBegin;

                //var MS_CheckDateBegin = [];
               // MS_CheckDateBegin = p.model.MS_CheckDateBegin;
                //if (MS_CheckDateBegin != null) {
                //    console.log("vvvvvvvvvvvvvvvvvvvvvv");
                //    console.log(MS_CheckDateBegin[0]);
                //    console.log("+++++++++++++++++++++++");
                //    console.log(MS_CheckDateBegin[1]);
                //    console.log("vvvvvvvvvvvvvvvvvvvvvv");
                //}


                //审核日期结束
                var MS_CheckDateEnd = p.model.MS_CheckDateEnd;

                //分页条件[从第几条取几个数据]
                var offset = p.offset;
                var limit = p.limit;
                //查询条件 按自己实际的去过滤
                //indexOf如果要检索的字符串值没有出现，则该方法返回 - 1。
                var limitArrays2 = [];
                for (var i = 0; i < $InfoRemind.Arrays.length; i++) {
                    var law = $InfoRemind.Arrays[i];

                    if (id && law.id.indexOf(id) == -1)
                        continue;
                    //制度名称
                    if (MS_InstitutionName && law.MS_InstitutionName.indexOf(MS_InstitutionName) == -1)
                        continue;
                    law.MS_InstitutionName = getDicValue("66", law.MS_InstitutionName) == '' ? law.MS_InstitutionName : getDicValue("66", law.MS_InstitutionName);
                    ////文件编号
                    //if (MS_FileNo && law.MS_FileNo.indexOf(MS_FileNo) == -1)
                    //    continue;
                    //law.MS_FileNo = getDicValue("68", law.MS_FileNo) == '' ? law.MS_FileNo : getDicValue("68", law.MS_FileNo);

                    //类别
                    if (MS_Sort && law.MS_Sort.indexOf(MS_Sort) == -1)
                        continue;
                    law.MS_Sort = getDicValue("65", law.MS_Sort) == '' ? law.MS_Sort : getDicValue("65", law.MS_Sort);

                    ////实施日期
                    //if (MS_ImplementationDate && law.MS_ImplementationDate.indexOf(MS_ImplementationDate) == -1)
                    //    continue;
                    ////评审日期
                    //if (MS_ReviewDate && law.MS_ReviewDate.indexOf(MS_ReviewDate) == -1)
                    //    continue;
                    //相关部门
                    if (MS_RelevantDepartments && law.MS_RelevantDepartments.indexOf(MS_RelevantDepartments) == -1)
                        continue;
                    law.MS_RelevantDepartments = getDicValue("67", law.MS_RelevantDepartments) == '' ? law.MS_RelevantDepartments : getDicValue("67", law.MS_RelevantDepartments);

                    ////状态
                    //if (MS_State && law.MS_State.indexOf(MS_State) == -1)
                    //    continue;
                    ////审核日期
                    //if (MS_CheckDate && law.MS_CheckDate.indexOf(MS_CheckDate) == -1)
                    //    continue;
                    ////修订日期
                    //if (MS_RevisionDate && law.MS_RevisionDate.indexOf(MS_RevisionDate) == -1)
                    //    continue;
                    ////备注
                    //if (MS_Mark && law.MS_Mark.indexOf(MS_Mark) == -1)
                    //    continue;

                    //审核人
                    if (MS_CheckPerson && law.MS_CheckPerson.indexOf(MS_CheckPerson) == -1)
                        continue;
                    if (MS_Mark && law.MS_Mark.indexOf(MS_Mark) == -1)
                        continue;
                    law.MS_CheckPerson = getDicValue("09", law.MS_CheckPerson) == '' ? law.MS_CheckPerson : getDicValue("65", law.MS_CheckPerson);



                    //if (MS_CheckDateBegin != null) {
                    //    //审核日期开始
                    //    if (MS_CheckDateBegin[0] && MS_CheckDateBegin[0] >= law.MS_CheckDate)
                    //        continue;

                    //    //审核日期结束
                    //    if (MS_CheckDateBegin[1] && MS_CheckDateBegin[1] <= law.MS_CheckDate)
                    //        continue;
                    //}


                    //审核日期开始
                    if (MS_CheckDateBegin && MS_CheckDateBegin >= law.MS_CheckDate)
                        continue;

                    //审核日期结束
                    if (MS_CheckDateEnd && MS_CheckDateEnd <= law.MS_CheckDate)
                        continue;

                    //将law加到limitArrays2数组中并且改变其长度
                    limitArrays2.push(law);
                }
                var limitArrays = [];
                //console.log(limitArrays2.length);
                for (var i = 0; i < limitArrays2.length; i++) {
                    if (i < offset + limit && i >= offset) {
                        limitArrays.push(limitArrays2[i]);
                    }
                }
                return {
                    result: "Success", message: null,
                    data: { pageData: limitArrays, rowCount: limitArrays2.length },
                };
            }); break;

            //获取Input数据__取管理制度列表数据20190605
            case '/api/InfoRemind/get': Mock.mock(host + url + '?' + param, type, function (options) {
                var myArrays = parent.$InfoRemind.Arrays;
                myarray = {};
                for (var i = 0; i < myArrays.length; i++) {
                    if (myArrays[i].id == vueApp.id) {
                        myarray = myArrays[i];
                        break;
                    }
                }

                //console.log("ooooogetbeginoooo");
                //console.log(myarray);
                //console.log("ooooogetendoooo");

                return {
                    result: "Success", message: null, data: myarray
                };
            }); break;

            //提交_提交管理制度表单数据20190605
            case '/api/InfoRemind/Save': Mock.mock(host + url, type, function (options) {
                var thisentity = JSON.parse(options.body);
                var thisArrays = parent.$InfoRemind.Arrays;
                var cz = true;
                for (var i = 0; i < thisArrays.length; i++) {
                    //按自己实际的去修改内容
                    if (thisArrays[i].id == thisentity.id) {
                        thisArrays[i].MS_Id = thisentity.MS_Id;
                        thisArrays[i].MS_InstitutionName = thisentity.MS_InstitutionName;
                        thisArrays[i].MS_FileNo = thisentity.MS_FileNo;
                        thisArrays[i].MS_Sort = thisentity.MS_Sort;
                        thisArrays[i].MS_ImplementationDate = thisentity.MS_ImplementationDate;
                        thisArrays[i].MS_RevisionDate = thisentity.MS_RevisionDate;
                        thisArrays[i].MS_ReviewDate = thisentity.MS_ReviewDate;
                        thisArrays[i].MS_RelevantDepartments = thisentity.MS_RelevantDepartments;
                        thisArrays[i].MS_Departments = thisentity.MS_Departments;
                        thisArrays[i].MS_State = "未审核";//thisentity.MS_State;
                        thisArrays[i].MS_RevisionDate = "2019-06-06";
                        cz = false;
                        break;
                    }
                }
                if (cz) {
                    //Input 页面需要 去操作List页面的数组 parent
                    //按自己实际的去添加内容
                    parent.$InfoRemind.Arrays.unshift({
                        id: thisentity.id,
                        MS_Id: thisentity.MS_Id,
                        MS_InstitutionName: thisentity.MS_InstitutionName,
                        MS_FileNo: thisentity.MS_FileNo,
                        MS_Sort: thisentity.MS_Sort,
                        MS_ImplementationDate: thisentity.MS_ImplementationDate,
                        MS_RevisionDate: thisentity.MS_RevisionDate,
                        MS_ReviewDate: thisentity.MS_ReviewDate,
                        MS_RelevantDepartments: thisentity.MS_RelevantDepartments,
                        MS_Departments: thisentity.MS_Departments,
                        MS_State: "未审核",//thisentity.MS_State
                        MS_RevisionDate: "2019-06-06"
                    });

                }


                return { result: "Success", message: null, data: null };

                //console.log("endendendend");

            }); break;
            ////删除_删除管理制度列表数据20190605
            case '/api/InfoRemind/DeleteMuti': Mock.mock(host + url, type, function (options) {
                var delIDs = options.body;
                var temp = [];
                for (var i = 0; i < $InfoRemind.Arrays.length; i++) {
                    temp.push($InfoRemind.Arrays[i]);
                }

                for (var i = 0; i < temp.length; i++) {
                    if (delIDs.includes(temp[i].id)) {

                        $InfoRemind.Arrays.splice(temp[i], 1);
                    }
                }
                return { result: "Success", message: null, data: null };
            }); break;

        }
    },

    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            var n = i;//控制统一序号用

            $InfoRemind.Arrays.push(Mock.mock({
                title: randomValue('67'),
                main: randomValue('66'),
                time: Mock.Random.date(),
                endTime: Mock.Random.date(),
                disposeState: randomValue('n98'),
                readState: randomValue('n99'),
            }));
        }
    }
};




//法律法规_管理制度
var $ManagementSystem = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            //获取列表和查询条件_管理制度
            case '/api/ManagementSystem/GetList': Mock.mock(host + url, type, function (options) {
                if ($ManagementSystem.Arrays.length == 0) {
                    $ManagementSystem.InitArray();
                }
                var p = JSON.parse(options.body);
                //查询条件 写自己的查询条件 

                //id
                var id = p.model.id;
                //序号
                var MS_Id = p.model.MS_Id;
                //制度名称
                var MS_InstitutionName = ("66", p.model.MS_InstitutionName);
                // //文件编号
                // var MS_FileNo = ("68", p.model.MS_FileNo);
                // //类别
                var MS_Sort = ("65", p.model.MS_Sort);
                // //实施日期
                // var MS_ImplementationDate = p.model.MS_ImplementationDate;
                // //评审日期
                // var MS_ReviewDate = p.model.MS_ReviewDate;
                //相关部门
                var MS_RelevantDepartments = ("67", p.model.MS_RelevantDepartments);

                //相关部门new
                var MS_Departments = p.model.MS_Departments;
                var MS_Mark = p.model.MS_Mark;


                // //状态
                // var MS_State = p.model.MS_State;
                // //审核日期
                // var MS_CheckDate = p.model.MS_CheckDate;
                // //修订日期
                // var MS_RevisionDate = p.model.MS_RevisionDate;
                ////备注
                // var MS_Mark = p.model.MS_Mark;
                // //var AuditStatus = p.model.AuditStatus;
                //审核人
                var MS_CheckPerson = ("09", p.model.MS_CheckPerson);
                //审核日期开始
                var MS_CheckDateBegin = p.model.MS_CheckDateBegin;

                //var MS_CheckDateBegin = [];
               // MS_CheckDateBegin = p.model.MS_CheckDateBegin;
                //if (MS_CheckDateBegin != null) {
                //    console.log("vvvvvvvvvvvvvvvvvvvvvv");
                //    console.log(MS_CheckDateBegin[0]);
                //    console.log("+++++++++++++++++++++++");
                //    console.log(MS_CheckDateBegin[1]);
                //    console.log("vvvvvvvvvvvvvvvvvvvvvv");
                //}


                //审核日期结束
                var MS_CheckDateEnd = p.model.MS_CheckDateEnd;

                //分页条件[从第几条取几个数据]
                var offset = p.offset;
                var limit = p.limit;
                //查询条件 按自己实际的去过滤
                //indexOf如果要检索的字符串值没有出现，则该方法返回 - 1。
                var limitArrays2 = [];
                for (var i = 0; i < $ManagementSystem.Arrays.length; i++) {
                    var law = $ManagementSystem.Arrays[i];

                    if (id && law.id.indexOf(id) == -1)
                        continue;
                    //制度名称
                    if (MS_InstitutionName && law.MS_InstitutionName.indexOf(MS_InstitutionName) == -1)
                        continue;
                    law.MS_InstitutionName = getDicValue("66", law.MS_InstitutionName) == '' ? law.MS_InstitutionName : getDicValue("66", law.MS_InstitutionName);
                    ////文件编号
                    //if (MS_FileNo && law.MS_FileNo.indexOf(MS_FileNo) == -1)
                    //    continue;
                    //law.MS_FileNo = getDicValue("68", law.MS_FileNo) == '' ? law.MS_FileNo : getDicValue("68", law.MS_FileNo);

                    //类别
                    if (MS_Sort && law.MS_Sort.indexOf(MS_Sort) == -1)
                        continue;
                    law.MS_Sort = getDicValue("65", law.MS_Sort) == '' ? law.MS_Sort : getDicValue("65", law.MS_Sort);

                    ////实施日期
                    //if (MS_ImplementationDate && law.MS_ImplementationDate.indexOf(MS_ImplementationDate) == -1)
                    //    continue;
                    ////评审日期
                    //if (MS_ReviewDate && law.MS_ReviewDate.indexOf(MS_ReviewDate) == -1)
                    //    continue;
                    //相关部门
                    if (MS_RelevantDepartments && law.MS_RelevantDepartments.indexOf(MS_RelevantDepartments) == -1)
                        continue;
                    law.MS_RelevantDepartments = getDicValue("67", law.MS_RelevantDepartments) == '' ? law.MS_RelevantDepartments : getDicValue("67", law.MS_RelevantDepartments);

                    ////状态
                    //if (MS_State && law.MS_State.indexOf(MS_State) == -1)
                    //    continue;
                    ////审核日期
                    //if (MS_CheckDate && law.MS_CheckDate.indexOf(MS_CheckDate) == -1)
                    //    continue;
                    ////修订日期
                    //if (MS_RevisionDate && law.MS_RevisionDate.indexOf(MS_RevisionDate) == -1)
                    //    continue;
                    ////备注
                    //if (MS_Mark && law.MS_Mark.indexOf(MS_Mark) == -1)
                    //    continue;

                    //审核人
                    if (MS_CheckPerson && law.MS_CheckPerson.indexOf(MS_CheckPerson) == -1)
                        continue;
                    if (MS_Mark && law.MS_Mark.indexOf(MS_Mark) == -1)
                        continue;
                    law.MS_CheckPerson = getDicValue("09", law.MS_CheckPerson) == '' ? law.MS_CheckPerson : getDicValue("65", law.MS_CheckPerson);



                    //if (MS_CheckDateBegin != null) {
                    //    //审核日期开始
                    //    if (MS_CheckDateBegin[0] && MS_CheckDateBegin[0] >= law.MS_CheckDate)
                    //        continue;

                    //    //审核日期结束
                    //    if (MS_CheckDateBegin[1] && MS_CheckDateBegin[1] <= law.MS_CheckDate)
                    //        continue;
                    //}


                    //审核日期开始
                    if (MS_CheckDateBegin && MS_CheckDateBegin >= law.MS_CheckDate)
                        continue;

                    //审核日期结束
                    if (MS_CheckDateEnd && MS_CheckDateEnd <= law.MS_CheckDate)
                        continue;

                    //将law加到limitArrays2数组中并且改变其长度
                    limitArrays2.push(law);
                }
                var limitArrays = [];
                //console.log(limitArrays2.length);
                for (var i = 0; i < limitArrays2.length; i++) {
                    if (i < offset + limit && i >= offset) {
                        limitArrays.push(limitArrays2[i]);
                    }
                }
                return {
                    result: "Success", message: null,
                    data: { pageData: limitArrays, rowCount: limitArrays2.length },
                };
            }); break;

            //获取Input数据__取管理制度列表数据20190605
            case '/api/ManagementSystem/get': Mock.mock(host + url + '?' + param, type, function (options) {
                var myArrays = parent.$ManagementSystem.Arrays;
                myarray = {};
                for (var i = 0; i < myArrays.length; i++) {
                    if (myArrays[i].id == vueApp.id) {
                        myarray = myArrays[i];
                        break;
                    }
                }

                //console.log("ooooogetbeginoooo");
                //console.log(myarray);
                //console.log("ooooogetendoooo");

                return {
                    result: "Success", message: null, data: myarray
                };
            }); break;

            //提交_提交管理制度表单数据20190605
            case '/api/ManagementSystem/Save': Mock.mock(host + url, type, function (options) {
                var thisentity = JSON.parse(options.body);
                var thisArrays = parent.$ManagementSystem.Arrays;
                var cz = true;
                for (var i = 0; i < thisArrays.length; i++) {
                    //按自己实际的去修改内容
                    if (thisArrays[i].id == thisentity.id) {
                        thisArrays[i].MS_Id = thisentity.MS_Id;
                        thisArrays[i].MS_InstitutionName = thisentity.MS_InstitutionName;
                        thisArrays[i].MS_FileNo = thisentity.MS_FileNo;
                        thisArrays[i].MS_Sort = thisentity.MS_Sort;
                        thisArrays[i].MS_ImplementationDate = thisentity.MS_ImplementationDate;
                        thisArrays[i].MS_RevisionDate = thisentity.MS_RevisionDate;
                        thisArrays[i].MS_ReviewDate = thisentity.MS_ReviewDate;
                        thisArrays[i].MS_RelevantDepartments = thisentity.MS_RelevantDepartments;
                        thisArrays[i].Department = thisentity.Department;
                        thisArrays[i].Dycle = thisentity.Dycle;
                        thisArrays[i].MS_Mark = thisentity.MS_Mark;
                        thisArrays[i].Attachment = thisentity.Attachment;
                        thisArrays[i].MS_Departments = thisentity.MS_Departments;
                        thisArrays[i].MS_State = "未审核";//thisentity.MS_State;
                        thisArrays[i].MS_RevisionDate = "2019-06-06";
                        cz = false;
                        break;
                    }
                }
                if (cz) {
                    //Input 页面需要 去操作List页面的数组 parent
                    //按自己实际的去添加内容
                    parent.$ManagementSystem.Arrays.unshift({
                        id: thisentity.id,
                        MS_Id: thisentity.MS_Id,
                        MS_InstitutionName: thisentity.MS_InstitutionName,
                        MS_FileNo: thisentity.MS_FileNo,
                        MS_Sort: thisentity.MS_Sort,
                        MS_ImplementationDate: thisentity.MS_ImplementationDate,
                        MS_RevisionDate: thisentity.MS_RevisionDate,
                        MS_ReviewDate: thisentity.MS_ReviewDate,
                        MS_RelevantDepartments: thisentity.MS_RelevantDepartments,
                        MS_Departments: thisentity.MS_Departments,
                        MS_Mark: thisentity.MS_Mark,
                        Attachment: thisentity.Attachment,
                        MS_State: "未审核",//thisentity.MS_State
                        MS_RevisionDate: "2019-06-06"
                    });

                }


                return { result: "Success", message: null, data: null };

                //console.log("endendendend");

            }); break;
            ////删除_删除管理制度列表数据20190605
            case '/api/ManagementSystem/DeleteMuti': Mock.mock(host + url, type, function (options) {
                var delIDs = options.body;
                var temp = [];
                for (var i = 0; i < $ManagementSystem.Arrays.length; i++) {
                    temp.push($ManagementSystem.Arrays[i]);
                }

                for (var i = 0; i < temp.length; i++) {
                    if (delIDs.includes(temp[i].id)) {

                        $ManagementSystem.Arrays.splice(temp[i], 1);
                    }
                }
                return { result: "Success", message: null, data: null };
            }); break;

        }
    },

    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            var n = i;//控制统一序号用

            $ManagementSystem.Arrays.push(Mock.mock({
                //id: Mock.Random.increment(),
                //随机所对应的文件级别--[汉字]
                //法律法规--管理制度
                MS_Id: n + 1,
                MS_InstitutionName: randomValue('66'),
                MS_FileNo: randomValue('68'),
                MS_Sort: randomValue('65'),
                Department: randomValue('85'),//归口部门
                Dycle: randomValue('120'),//评审周期
                MS_ImplementationDate: Mock.Random.date(),
                MS_RevisionDate: Mock.Random.date(),
                MS_ReviewDate: Mock.Random.date(),
                MS_RelevantDepartments: randomValue('67'),
                MS_Departments: '', //相关部门new
                MS_State: "未审核",
                MS_CheckDate: Mock.Random.date(),// "",
                MS_RevisionDate: Mock.Random.date(),
                MS_Mark: "",
                MS_RevisionPerson: randomValue('09'),
                MS_CheckPerson: randomValue('09'),
                Attachment: randomValue('98'),
                MS_CheckDescription: "审核情况说明",
                id: Mock.Random.id()
            }));
        }
    }
};















































//树
var testTree = [
    {
        "id": 13,
        "pluginId": null,
        "pid": 0,
        "order": 1,
        "name": "truck",
    },

    {
        "id": 17,
        "pluginId": 6,
        "pid": 16,
        "order": 1,
        "name": "abcf",
    },
    {
        "id": 18,
        "pluginId": 6,
        "pid": 17,
        "order": 1,
        "name": "abcf12312",
    }, {
        "id": 16,
        "pluginId": null,
        "pid": 0,
        "order": 1,
        "name": "sca",
    },
];

//Model替换成表名--真后台写法
var $Model = {
    DealUrl: function (vueApp, url, type, param) {
        switch (url) {
            //Model替换成表名
            case '/api/Model/DeleteMuti': Mock.mock(host + url, type, function (options) {
                var delIDs = options.body;
                var temp = [];
                //Model替换成表名
                for (var i = 0; i < $Model.Arrays.length; i++) {
                    //Model替换成表名
                    temp.push($Model.Arrays[i]);
                }
                for (var i = 0; i < temp.length; i++) {
                    if (delIDs.includes(temp[i].id)) {
                        //Model替换成表名
                        $Model.Arrays.splice(i, 1);
                    }
                }
                return { result: "Success", message: null, data: null };
            }); break;
            //Model替换成表名
            case '/api/Model/GetList': Mock.mock(host + url, type,
                function (options) {
                    //Model替换成表名
                    if ($Model.Arrays.length == 0) {
                        //Model替换成表名
                        $Model.InitArray();
                    }
                    var p = JSON.parse(options.body);
                    //遍历字段
                    var loginName = p.model.loginName;
                    var sex = p.model.sex;


                    var offset = p.offset;
                    var limit = p.limit;

                    var limitArrays2 = [];
                    //Model替换成表名
                    for (var i = 0; i < $Model.Arrays.length; i++) {
                        //Model替换成表名
                        var myentity = $Model.Arrays[i];
                        //遍历所有字段 过滤数据
                        if (loginName && myentity.loginName.indexOf(loginName) == -1)
                            continue;
                        if (sex && myentity.sex.indexOf(sex) == -1)
                            continue;
                        limitArrays2.push(myentity);
                    }
                    var limitArrays = [];
                    for (var i = 0; i < limitArrays2.length; i++) {
                        if (i < offset + limit && i >= offset) {
                            limitArrays.push(limitArrays2[i]);
                        }
                    }
                    return {
                        result: "Success", message: null,
                        data: { pageData: limitArrays, rowCount: limitArrays2.length }
                    };
                }); break;
            //Model替换成表名
            case '/api/Model/get': Mock.mock(host + url + '?' + param, type, function (options) {
                //Model替换成表名
                var myArrays = parent.$Model.Arrays;
                myarray = {};
                for (var i = 0; i < myArrays.length; i++) {
                    if (myArrays[i].id == vueApp.id) {
                        myarray = myArrays[i];
                        break;
                    }
                }
                return {
                    result: "Success", message: null, data: myarray
                };
            }); break;
            //Model替换成表名
            case '/api/Model/Save': Mock.mock(host + url, type, function (options) {
                var thisentity = JSON.parse(options.body);
                //Model替换成表名
                var thisArrays = parent.$Model.Arrays;
                var cz = true;
                for (var i = 0; i < thisArrays.length; i++) {
                    //遍历所有字段 赋值
                    if (thisArrays[i].id == thisentity.id) {
                        thisArrays[i].loginName = thisentity.loginName;
                        thisArrays[i].name = thisentity.id;
                        thisArrays[i].password = thisentity.password;
                        thisArrays[i].sex = thisentity.sex;
                        thisArrays[i].remarks = thisentity.remarks;
                        thisArrays[i].lastUpdate = thisentity.lastUpdate;

                        cz = false;
                        break;
                    }
                }
                if (cz) {
                    //Model替换成表名
                    parent.$Model.Arrays.push({
                        //遍历所有字段 赋值
                        id: thisentity.id,
                        loginName: thisentity.loginName,
                        name: thisentity.name,
                        password: thisentity.password,
                        sex: thisentity.sex,
                        remarks: thisentity.remarks,
                        lastUpdate: thisentity.lastUpdate

                    });
                }

                return { result: "Success", message: null, data: null };
            }); break;


        }


    },
    Arrays: [],
    InitArray: function () {
        for (var i = 0; i < 20; i++) {
            //注意  随机数据初始都是随机姓名，需要自己手动调整
            $Model.Arrays.push(Mock.mock({
                //遍历所有字段 赋值  建议数据库设计时每个表 均保留id，赋值为Mock.Random.id() 其他字段 可以默认赋值为中文名Mock.Random.cname() 之后自行调整
                loginName: Mock.Random.cname(),
                password: Mock.Random.cname(),
                name: Mock.mock('@county(true)'),
                lastUpdate: Mock.Random.date(),
                remarks: Mock.mock('@county(true)'),
                sex: randomValue('01'),
                id: Mock.Random.id()
            }));
        }
    }
}

//--http://mockjs.com/examples.html mock规则



